package com.itlong.cloud.app.dao;

import com.itlong.cloud.POJO.PO.DeviceEntranceRecordPO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * <desc>
 *      门禁通行记录数据访问接口
 * </desc>
 *
 * @createDate 2017/11/10
 */
@Mapper
@Repository
public interface IAppDeviceEntranceRecordDao extends IAbstractBaseDao<DeviceEntranceRecordPO>{
    /**
     * <desc>
     *      保存门禁通行记录
     * </desc>
     *
     * @param params 数据参数
     * @return
     * @author Jiaqi.X
     * @createDate 2017/11/10
     */
    Integer save(Map<String,Object> params);

    /**
     * <desc>
     *      根据设备唯一码获取设备机号
     * </desc>
     *
     * @param deviceUnique
     * @return
     * @author Jiaqi.X
     * @createDate 2017/11/10
     */
    String getDeviceIdByDeviceUnique(@Param("deviceUnique")String deviceUnique);

    /**
     * <desc>
     *      根据手机号获取userId
     * </desc>
     *
     * @return userId
     * @author wangzhi
     * @createDate 2019/04/01
     */
    String getUserIdByPhoneNum(@Param("phoneNum") String visitorUuid);
}
